# -*- coding:utf-8 -*-
from django.conf.urls import url
from manufacturer.views_register import AlarmMsgListView, StatusMstListView, AlarmMstStatisticsView, \
    ElevatorMalfunctionListCreateView, RepairContentDetailView, RepairContentListCreateView, \
    RepairDetailView, ElevatorMalfunctionDetailView, \
    StatusMonitorListView, StatusMonitorRetrieveViewV2, ElevatorFaultListView, StatusMultiMonitorListView, \
    RepairTypeListCreateView, ElevatorMalfunctionDownload, AuthorityCodeDetailView, AuthorityCodeListCreateView, CompanyForAuthorityCodeListView, \
    ElevatorForAuthorityCodeListView, CompanyPlatformListCreateView, CompanyPlatformDetailView, \
    ManufacturerListCreateView, ManufacturerDetailView, ManufacturerForPlatformListView, ManufacturerDownLoadView, \
    RequestToRLForStatusView, OrganizationForAlarmsListView, AlarmsStatisticsListView, \
    ElevatorFaultAnalysisListCreateView, ElevatorFaultAnalysisDetailView, PersonsForElevatorFaultAnalysisListView,\
    ElevatorFaultAnalysisDownLoadView, AuthorityCodeUserRelationView, ElevatorFaultPolling, MonitorStatisticsView, \
    MonitorBasicInfoView, ElevatorFaultCreateElevatorMalfunction
from manufacturer.views_app import AppElevatorMalfunctionDetailView, AppElevatorMalfunctionListView, \
    QueryRepairContentView, ElevatorStatusListAppView, ElevatorStatusDetailAppView, ElevatorWarningListAppView, \
    AppElevatorStatusStatisticsView

urlpatterns = [
    url(r"^elevator/alarms/$", AlarmMsgListView.as_view(), name="alarm-list"),
    url(r"^elevator/alarms/repair/$", ElevatorFaultCreateElevatorMalfunction.as_view(), name="alarm-list"),
    url(r"^elevator/alarms/rotation/$", ElevatorFaultPolling.as_view(), name="alarm-list"),
    url(r"^elevator/alarmsV2/$", ElevatorFaultListView.as_view(), name="alarm-list"),
    url(r"^elevator/alarm/organization/$", OrganizationForAlarmsListView.as_view(), name="alarm-list"),
    url(r"^elevator/alarm/statistics/$", AlarmsStatisticsListView.as_view(), name="alarm-list"),
    url(r"^elevator/status/$", StatusMstListView.as_view(), name="status-list"),
    url(r"elevator/$", StatusMonitorListView.as_view(), name="elevator-list"),
    url(r"^elevator/follow/$", AuthorityCodeUserRelationView.as_view(), name="do"),
    url(r"elevator/request/$", RequestToRLForStatusView.as_view(), name="elevator-list"),
    url(r"elevator/multi/$", StatusMultiMonitorListView.as_view(), name="elevator-list"),
    url(r"elevator/(?P<pk>\d+)/$", StatusMonitorRetrieveViewV2.as_view(), name="elevator-datail"),
    url(r"^elevator/record/statistics/$", MonitorStatisticsView.as_view(), name="statistics-list"),
    url(r"^elevator/basic/statistics/$", MonitorBasicInfoView.as_view(), name="statistics-list"),
    url(r"^elevator/alarms/statistics/$", AlarmMstStatisticsView.as_view(), name="statistics-list"),
    url(r"^elevator/repair/$", ElevatorMalfunctionListCreateView.as_view(), name="list-and-create"),
    url(r"^elevator/repair/download/$", ElevatorMalfunctionDownload.as_view(), name="list-and-create"),
    url(r"^elevator/repair/(?P<pk>\d+)/$", ElevatorMalfunctionDetailView.as_view(), name="get-update-delete"),
    url(r"^elevator/content/$", RepairContentListCreateView.as_view(), name="content-list-create"),
    url(r"^elevator/content/(?P<pk>\d+)/$", RepairContentDetailView.as_view(), name="content-list-create-delete"),
    url(r"^elevator/type/(?P<pk>\d+)/$", RepairDetailView.as_view(), name="content-list-create"),
    url(r"^elevator/type/$", RepairTypeListCreateView.as_view(), name="content-list-create"),
    url(r"^app/elevator/repair/$", AppElevatorMalfunctionListView.as_view(), name="list-for-app"),
    url(r"^app/elevator/repair/(?P<pk>\d+)/$", AppElevatorMalfunctionDetailView.as_view(), name="detail-for-app"),
    url(r"^app/elevator/content/$", QueryRepairContentView.as_view(), name="list-for-app"),
    url(r"^app/elevator/status/$", ElevatorStatusListAppView.as_view(), name="list-for-app"),
    url(r"^app/elevator/warn/$", ElevatorWarningListAppView.as_view(), name="list-for-app"),
    url(r"^app/elevator/status/code/$", ElevatorStatusDetailAppView.as_view(), name="list-for-app"),
    url(r"^app/elevator/status/statistics/$", AppElevatorStatusStatisticsView.as_view(), name="list-for-app"),
    url(r"^collection/$", AuthorityCodeListCreateView.as_view(), name="list-create"),
    url(r"^collection/(?P<pk>\d+)/$", AuthorityCodeDetailView.as_view(), name="create-put-delete"),
    url(r"^collection/company/$", CompanyForAuthorityCodeListView.as_view(), name="list"),
    url(r"^collection/elevator/$,", ElevatorForAuthorityCodeListView.as_view(), name="list"),
    url(r"^platform/$", CompanyPlatformListCreateView.as_view(), name="list-create"),
    url(r"^platform/(?P<pk>\d+)/$", CompanyPlatformDetailView.as_view(), name="detail"),
    url(r"^platform/manufacturer/$", ManufacturerForPlatformListView.as_view(), name="list-create"),
    url(r"^manufacturer/$", ManufacturerListCreateView.as_view(), name="list-create"),
    url(r"^manufacturer/download/$", ManufacturerDownLoadView.as_view(), name="down"),
    url(r"^manufacturer/(?P<pk>\d+)/$", ManufacturerDetailView.as_view(), name="detail"),
    url(r"^elevator/fault/$", ElevatorFaultAnalysisListCreateView.as_view(), name="down"),
    url(r"^elevator/fault/download/$", ElevatorFaultAnalysisDownLoadView.as_view(), name="down"),
    url(r"^elevator/fault/persons/$", PersonsForElevatorFaultAnalysisListView.as_view(), name="down"),
    url(r"^elevator/fault/(?P<pk>\d+)/$", ElevatorFaultAnalysisDetailView.as_view(), name="detail")

]